<script lang='ts'>
import { defineComponent, ref, onMounted } from 'vue'
import EMitt from '@/mitt'
export default defineComponent({
  components: {
  },
  setup () {
    const fuc = () => {
      EMitt.emit('click', 1)
    }
    onMounted(() => {
      EMitt.on('click', (data) => {
        console.log(data)
      })
    })
    return {
      input: ref(''),
      fuc
    }
  }
})
</script>
<template>
  <div>
    <el-input v-model="input" placeholder="Please input" />
    <button @click="fuc">click</button>
  </div>
</template>
<style lang='scss' scoped>
</style>
